package com.bms.hystrix.interfaces.kyjlgl;

import com.bms.hystrix.pojo.ChuFangGuanLiChanXun;
import com.bms.hystrix.pojo.HeZuoJiHuaGuanLiChaXun;
import com.bms.hystrix.pojo.HeZuoJiHuaGuanLiGenXing;
import com.bms.hystrix.pojo.HeZuoJiHuaGuanLiZhengJia;
import io.swagger.annotations.ApiParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

// 此接口与feign中定义的接口一样，直接迁移过来即可
// 调用一个子服务模块，需要在注解中指定，名字由client的yml文件定义
@FeignClient(value = "EUREKA-CLIENT-KYJLGL")
public interface HeZuoJiHuaGuanLiInterface {
    @RequestMapping(value = "/heZuoJiHuaGuanLi/chaXunFenYe",method = RequestMethod.POST,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Map<String, Object> chaXunFenYe(@RequestParam(value = "heZuoJiHuaGuanLiChaXun") HeZuoJiHuaGuanLiChaXun heZuoJiHuaGuanLiChaXun);

    @RequestMapping(value = "/heZuoJiHuaGuanLi/shanChuById",method = RequestMethod.POST,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Map<String, Object> shanChuById(@RequestParam("id") int id);

    @RequestMapping(value = "/heZuoJiHuaGuanLi/gengXinById",method = RequestMethod.POST,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Map<String, Object> gengXinById(@RequestParam(value = "heZuoJiHuaGuanLiGenXing") HeZuoJiHuaGuanLiGenXing heZuoJiHuaGuanLiGenXing);

    @RequestMapping(value = "/heZuoJiHuaGuanLi/xinZeng",method = RequestMethod.POST,
            produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
    Map<String, Object> xinZeng(@RequestParam(value = "heZuoJiHuaGuanLiZhengJia") HeZuoJiHuaGuanLiZhengJia heZuoJiHuaGuanLiZhengJia);

}
